package Package1;

public class Test1 {
    public static void main(String[] args) {
        MyClass1 c1_1=new MyClass1();
        MyClass1 c1_2=new MyClass1(1);
        c1_1.print(2);

    }
}

class MyClass1 {
    public static final String name="Myclass1";
    public MyClass1(){
        System.out.println("Myclass1");
    }

    int ID;
    public MyClass1(int ID1){
        System.out.println("Myclass1");
        ID=ID1;
    }

    public void print(int ID){
        System.out.println("Myclass1"+this.ID);
        System.out.println("Myclass1"+ID);
    }


    private int A=5;
    protected int B=2;
}

class MyClass2 extends MyClass1{
    public static final String name="Myclass2";
    public MyClass2(){
        System.out.println("Myclass2");
    }
    public MyClass2(int ID1,int ID2){
        System.out.println("Myclass2");
        ID=ID1;
    }
    int ID;
    public MyClass2(int ID1){
        this(1,2);
        System.out.println("Myclass2");
        ID=ID1;
    }
}

class MyClass3 extends MyClass2{
    public static final String name="Myclass3";


}
